package com.sina.shop.manage.service.admin;


import com.sina.shop.core.BaseService;
import com.sina.shop.core.exception.client.DataException;
import com.sina.shop.core.exception.server.CreateException;
import com.sina.shop.core.exception.server.ResourceExistsException;
import com.sina.shop.core.exception.server.UpdateException;
import com.sina.shop.domain.admin.Permission;

import java.util.List;
import java.util.Map;

/**
 * Created with IntelliJ IDEA.
 * Description:权限管理的service
 * 段浩杰   2017-12-13-14:05
 */
public interface PermissionManageService extends BaseService {

    Permission getPermissionByName(String name);

    Permission getPermissionById(Long id);

    int deletePermission(Long id) throws DataException, UpdateException;

    Permission savePermission(Permission permission) throws CreateException, ResourceExistsException, DataException;

    Permission updatePermission(Permission permission) throws UpdateException, DataException;

    List<Map<String, Object>> getPermissionList(Permission permission, Long count[]);

    List<Map<String, Object>> getPermissionIdAndNameList(Boolean hasAll);
}
